<template>
    <section>
        <sy-baselist
                ref="main"
                :filters="filters"
                @beforeDelete="beforeDelete"
                editVue="./system/User_Edit.vue"
                listUrl="server/system/User.ashx?cmd=GetUserList"
                deleteUrl="server/system/User.ashx?cmd=DeleteUser"
        >
            <el-table-column prop="FCode" label="登录名" width="100" >
            </el-table-column>
            <el-table-column prop="FName" label="用户名" width="200" >
            </el-table-column>
            <el-table-column prop="FRealName" label="真实名字" width="140" >
            </el-table-column>
            <el-table-column prop="FPhone" label="手机" width="150" >
            </el-table-column>
            <el-table-column prop="FTelPhone" label="办公电话" width="150" >
            </el-table-column>
            <el-table-column prop="FEMail" label="邮箱" width="150" >
            </el-table-column>
            <el-table-column prop="FNote" label="备注" width="120" >
            </el-table-column>
        </sy-baselist>
    </section>
</template>

<script>
    import util from '../../common/util'
    import MoveUser from './User_Move.vue'
    export default {
        data(){
            return {
                filters: [{type: "string",name:"FName",text:"用户名", value: ""}]
            }
        },
        methods:{
            beforeDelete(row,r){
                if(row.FID<0) {
                    return r.error = "系统用户，不能删除";
                }
            },
            move(row){
               this.$refs.moveUser._openEdit(row)
            },
            moveSaveSuc(){
                this.$refs.main._refrash()
            }
        }
    }
</script>